<template>
    <div class="lwy-live">
        <div class="lwy-head">
            <el-menu :router="true" default-active="/happyhome/live/cook" class="lwy-heads">
                <el-menu-item index="/happyhome/live/cook">
                    <span>菜谱</span>
                </el-menu-item>
                <el-menu-item index="/happyhome/live/account" v-if="power=='大人'||power=='老人'">
                    <span slot="title">账本</span>
                </el-menu-item>
            </el-menu>
            <hr>
        </div>
        <RouterView></RouterView>
    </div>
</template>
<script>
export default {
    data(){
        return{
            power:''
        }
    },
    mounted(){
        let power=sessionStorage.getItem('userType')
        this.power=power;
    }
}
</script>
<style scoped lang="less">
.lwy-head {
    .lwy-heads {
        .el-menu-item {
            float: left;
            margin-left: 18px;

            span {
                display: inline-block;
                line-height: 40px;
                background-color: rgb(255, 255, 255);
                border: 1px solid #949494;
                border-top: none;
                box-shadow: 0px 6px 6px #9a9595;
                width: 100px;
                cursor: pointer;
            }
        }
    }

}
</style>